package com.daka.dao;

import com.daka.entity.AuctionTradeList;
import com.daka.mybatis.SQLMapper;
import com.daka.vo.response.ListTeamAuctionVo;
import com.daka.vo.response.ListUserAuctionVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository(value = "auctionTradeListDao")
@SQLMapper
public interface AuctionTradeListDao {

    int insert(AuctionTradeList record);

    AuctionTradeList selectByPrimaryKey(Long id);

    List<AuctionTradeList> selectByUserId(Long userId);

    List<AuctionTradeList> selectByStatement(AuctionTradeList record);

    int selectByStatementCount(AuctionTradeList record);

    int updateByPrimaryKeySelective(AuctionTradeList record);

    int updatePayFlagById(@Param("id") Long id,@Param("payFlag") Integer payFlag);

    int updatePayFlagByType(@Param("type") Integer type,@Param("payFlag") Integer payFlag);

    int countAll();

    List<AuctionTradeList> selectAllByGoods(Long goodId);

    List<ListUserAuctionVo> selectUserRank();
    List<ListTeamAuctionVo> selectTeamRank();
}